package com.lyj.io.module.sys.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.lyj.io.module.sys.dao.SysPermissionDao;
import com.lyj.io.module.sys.entity.SysPermission;
import com.lyj.io.module.sys.service.SysPermissionService;
import org.springframework.stereotype.Service;

/**
 * 授权接口
 * @author: 李亚杰
 * @version: 1.0
 * @date: 2021/8/19 14:51
 */
@Service
public class SysPermissionServiceImpl extends ServiceImpl<SysPermissionDao, SysPermission> implements SysPermissionService {
    @Override
    public SysPermission getPermissionsByRoleId(String roleId) {
        QueryWrapper<SysPermission> queryWrapper = new QueryWrapper<SysPermission>();
        queryWrapper.eq("role_id", roleId);
        queryWrapper.eq("delete_flag", "0");
        return this.baseMapper.selectOne(queryWrapper);
    }
}
